function [ dxr,dxl,dyt,dyb,hx,hy ] = getSpacingP( i,j,Xp,Yp,Hxp,Hyp )

if (i==1)
    dxl = 0;
else
    dxl = Xp(i) - Xp(i-1);
end

if (i==size(Xp,2))
    dxr = 0;
else
    dxr = Xp(i+1) - Xp(i);
end
    
if (j==1)
    dyb = 0;
else
    dyb = Yp(j) - Yp(j-1);
end
    
if (j==size(Yp,2))
    dyt = 0;
else
    dyt = Yp(j+1) - Yp(j);
end


hx = Hxp(i);
hy = Hyp(j);


end

